package org.feng.config;

import lombok.Data;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;
import org.springframework.util.CollectionUtils;

import javax.annotation.PostConstruct;
import java.util.HashSet;
import java.util.Set;

/**
 * WebFilter 配置
 *
 * @author feng
 */
@Component
@Data
@Slf4j
@ConfigurationProperties("web.filter")
public class WebFilterProperties {

    private Set<String> skipLogUrls;


    @PostConstruct
    private void init() {
        if (CollectionUtils.isEmpty(skipLogUrls)) {
            skipLogUrls = new HashSet<>();
        }

        log.info("skipLogUrls = {}", skipLogUrls);
    }
}
